//
//  StatisticalView.m
//  LightningReimbursement
//
//  Created by 企点点 on 15/8/4.
//  Copyright (c) 2015年 企点点. All rights reserved.
//

#import "StatisticalView.h"

@interface StatisticalView ()

// 总花销
@property (nonatomic, strong) UILabel *label;

@end

@implementation StatisticalView

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self addSubview:self.label];
    }
    return self;
}

// 创建单例的方法

+ (StatisticalView *)danliView {
    static StatisticalView *danali = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        danali = [[StatisticalView alloc] init];
    });
    return danali;
}

// 懒加载
- (UILabel *)label {
    if (!_label) {
        self.label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 300, 30)];
        self.label.text = @"已入账总花销";
        self.label.textAlignment = NSTextAlignmentCenter;
    }
    return _label;
}



@end
